-
Notifications
You must be signed in to change notification settings - Fork 447
chore: Add a DA service unit test #3423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop-2.0.0
Are you sure you want to change the base?
Conversation
…/com.unity.netcode.gameobjects into chore/rust-unit-test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only 1 or 2 questions and a minor suggestion on wording for API documentation.
Otherwise, very nice job:
- Cleaning up various areas within the NetcodeIntegrationTest.
- Improved the "readability" in many places.
- Added a more standard way to obtain various NetworkManager instances.
- Cleaning up various integration tests
- Improved the "readability" in many places.
- Created a more uniform standard "flow" and naming.
- Adding UseCMBService to tests that still needed conversion along with comments.
- Removing m_EnableVerboseDebug to reduce over-all test runner log size.
🥇 💯
com.unity.netcode.gameobjects/TestHelpers/Runtime/NetcodeIntegrationTest.cs
Outdated
Show resolved
Hide resolved
com.unity.netcode.gameobjects/TestHelpers/Runtime/NetcodeIntegrationTest.cs
Outdated
Show resolved
Hide resolved
com.unity.netcode.gameobjects/TestHelpers/Runtime/NetcodeIntegrationTest.cs
Show resolved
Hide resolved
....netcode.gameobjects/Tests/Runtime/DistributedAuthority/NetworkClientAndPlayerObjectTests.cs
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/OwnershipPermissionsTests.cs
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectOwnershipTests.cs
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsTests.cs
Show resolved
Hide resolved
testproject/Assets/Tests/Runtime/NetworkSceneManager/InScenePlacedNetworkObjectTests.cs
Show resolved
Hide resolved
This is an attempt to fix an issue where Mac OSX is frequently failing the InterpolationStopAndStartMotionTest. Based on the error, I am thinking (hard to tell since it doesn't replicate locally in-editor nor stand alone) that it could be due to a Mac VM running slower than expected (randomly) which could cause the network tick event to trigger more than once in a single frame.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done!
.yamato/desktop-standalone-tests.yml
Outdated
- cd ./mps-common-multiplayer-backend/runtime && $HOME/.cargo/bin/cargo build --example ngo_echo_server | ||
# Run the echo server in the background - this will reuse the artifacts from the build | ||
- cd ./mps-common-multiplayer-backend/runtime && $HOME/.cargo/bin/cargo run --example ngo_echo_server -- --port $ECHO_SERVER_PORT & | ||
- ./Tools/CI/run_cmb_service.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice separation 👌
# Set this to ensure the DA codec tests will fail if they cannot connect to the echo-server | ||
# The default is to ignore the codec tests if the echo-server fails to connect | ||
ENSURE_CODEC_TESTS: "true" | ||
USE_CMB_SERVICE: "true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see where we are using it 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's inside the UseCMBService()
function inside NetcodeIntegrationTest.cs
(here)
.yamato/desktop-standalone-tests.yml
Outdated
@@ -81,21 +81,17 @@ desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ | |||
{% if platform.name != "win" %} # Issues with win and mac are tracked in MTT-11606 | |||
variables: | |||
ECHO_SERVER_PORT: "7788" | |||
CMB_SERVICE_PORT: "7799" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could maybe add a quick comment to those 2 lines to just point where it's used/why we need 2 ports
Tools/CI/run_cmb_service.sh
Outdated
@@ -0,0 +1,19 @@ | |||
# clone the latest rust repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that actually we could include a short "overall description" of this script (similarly as in other CI files) to describe for example
- Why we need this script (DA testing)
- Is there anything specific reader should know (example: won't work on windows)
- Is is a solution for DA only or it functions more as "distributed testing" so it could be potentially extended to different areas
- Where we can find usage of this script (desktop-standalone-tests)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Added a bunch of info at the top of the file. I hope it makes things clearer
MTT-11550
Changelog
Testing and Documentation
Backport
No backport applicable - DA only